import { MessageBox } from "element-ui";
export default {
  install(Vue) {
    Vue.prototype.confirm = proms => {
      MessageBox.confirm(proms.title, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: proms.tips || "warning",
        center: true
      })
        .then(() => {
          proms.fn && proms.fn(proms.id);
        })
        .catch(() => {
          proms.catch && proms.catch();
        });
    };
  }
};
